﻿using System;
using System.Data.Common;
namespace WyUnity.Data.DataAccess
{
	public interface ISqlDialect
	{
		/// <summary>
		/// 格式举例：[{0}] 或者 `{0}`
		/// </summary>
		string NameFormat { get; }

//		/// <summary>
//		/// 数据提供者
//		/// </summary>
//		DbProviderFactory Provider { get; }

		DbParameter CreateParameter();
		DbConnection CreateConnection(string connectionString);
		DbCommand CreateCommand();
		DbDataAdapter CreateDataAdapter();
		/// <summary>
		/// 返回SQL数据类型
		/// </summary>
		string GetSqlType(Type datatype, int length);

		/// <summary>
		/// 返回行版本的定义
		/// </summary>
		string GetRowVersionDefine(string name);
	}
}